<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ru" xml:lang="ru">
    <head>
        <title>plane edit</title>
        <link rel="stylesheet" href="css/edit.css"/>
        <link rel="stylesheet" href="css/dialog.css"/>
        <script type="text/javascript" src="js/jquery-1.7.1.js"></script>
        <script type="text/javascript" src="js/modaldialog.js"></script>
        <script type="text/javascript" src="js/infohandle.js"></script>

        <!-- Load TinyMCE -->
        <script type="text/javascript" src="js/tiny_mce/jquery.tinymce.js"></script>
        <script type="text/javascript" src="js/tiny_mce/tiny_mce.js"></script>
        <script type="text/javascript">
            $().ready(function() {
                   tinymce().create('tinymce.plugins.ExamplePlugin', {
                    createControl: function(n, cm) {
                        switch (n) {
                            case 'mylistbox':
                                var mlb = cm.createListBox('mylistbox', {
                                    title : 'My list box',
                                    onselect : function(v) {
                                        tinyMCE.activeEditor.windowManager.alert('Value selected:' + v);
                                    }
                                });

                                // Add some values to the list box
                                mlb.add('Some item 1', 'val1');
                                mlb.add('some item 2', 'val2');
                                mlb.add('some item 3', 'val3');

                                // Return the new listbox instance
                                return mlb;

                        }

                        return null;
                    }
                });
                // Register plugin with a short name
                tinymce().PluginManager.add('example', tinymce.plugins.ExamplePlugin);
                
                $('.editor-area').tinymce({
                    // Location of TinyMCE script
                    script_url : 'js/tiny_mce/tiny_mce.js',
                    
                    // General options
                    theme : "advanced",
                    skin : "o2k7",
                    plugins : "-example,advhr, advimage, advlist, autolink, autoresize, contextmenu, fullpage, fullscreen,"+ 
                        "inlinepopups, insertdatetime, layer, legacyoutput, lists,nonbreaking, noneditable, pagebreak,"+
                        "paste, preview, print, save, searchreplace, style, tabfocus, table, visualchars, wordcount",

                    // Theme options
                    theme_advanced_buttons1 : "mylistbox",
                    theme_advanced_buttons2 : "bold,italic,underline,strikethrough,|,sub,sup,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,blockquote,|,link,unlink,anchor,|,forecolor,backcolor,|,styleselect,formatselect,|,styleprops",
                    theme_advanced_buttons3 : "tablecontrols,|,image,|,nonbreaking,hr,charmap,advhr,cut,copy,paste,pastetext,pasteword,|,search,replace,|,undo,redo,|,visualchars,|,removeformat,cleanup,|,code,preview,|,fullscreen,|,print,help",
                    theme_advanced_toolbar_location : "top",
                    theme_advanced_toolbar_align : "left",
                    theme_advanced_statusbar_location : "bottom",
                    theme_advanced_resizing : true,

                    // Example content CSS (should be your site CSS)
                    content_css : "css/content.css"

                });
            });
        </script>
        <!-- /TinyMCE --> 
        <style type="text/css">
            #aticle-edit-dlg {
                display: block;
            }
        </style>

    </head>
    <body>
        <div style="width: 100%">
            <%@include file="WEB-INF/jspf/article-edit-dialog.jspf" %>
        </div>
    </body>
</html>
